﻿//----------------------------------------------------------------
// Desc: 
// Edit: ShowLong, http://blog.csdn.net/showlong
//
// Date Created: 2012-04-13
//
// Update Date : 
//
// Copyright (c) Fuel4D (http://www.fuel4d.com), All rights reserved.
//
//----------------------------------------------------------------
#pragma once


//----------------------------------------------------------------
// 自动书写从IFPropObject继承的对象属性函数
//----------------------------------------------------------------
#define FDECLARE_PROPERTY(name, mark) \
    FINLINE void Set##name(bool v)\
    {\
        if (v)\
            AddProperty(mark);\
        else\
            SubProperty(mark);\
    }\
    FINLINE bool Is##name()\
    {\
        return HasProperty(mark);\
    }


class IFPropObject : public IFRefObject, public FProperty
{
protected:
    explicit IFPropObject(DWORD prop)
        :FProperty(prop)
    {}
};